<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="resources/css/bootstrap.min.css" >
<title>所有书籍</title>
</head>
<body>
<table class="table table.bordered">
   <thead>
   <h1 style="color:green">${userName},你好!</h1><br/>
   <h2>您一共有${books.size()}条Book</h2><br/>
   <a href="book/add" class="btn btn-primary" role="button"  >添加</a><a href="<%=request.getContextPath()%>/login">退出</a>
   <tr><th>书名</th> <th>简介</th> <th>作者  </th><th>操作  </th></tr>
   </thead>
   <tbody>
      <c:forEach var="book" items="${books}">
      <tr>
          <td><a href="book/${book.id}">${book.title}</a></td>
          <td>${book.brief}</td>
          <td>${book.author}</td>
          <td><a href="book/delete?id=${book.id}" calss="btn btn-warning">删除</a></td>
          <td><a href="book/edit?id=${book.id}">修改</a></td>
      </tr>
      </c:forEach>
   </tbody>
</table>

</body>
</html>